//package com.zlx.module_base.sys_info;
//
//import android.content.Context;
//import android.content.Intent;
//import android.text.TextUtils;
//
//import androidx.annotation.NonNull;
//import androidx.fragment.app.FragmentManager;
//
//import com.google.gson.Gson;
//import com.jess.arms.utils.ArmsUtils;
//import com.orhanobut.logger.Logger;
//
//import java.util.ArrayList;
//import java.util.List;
//
//import static com.zlx.module_base.sys_info.MenuConstant.MENU_WZJY;
//
///**
// * <li>标题:菜单生成与解析 - 襄阳
// * <li>说明:
// * <li>创建人：邹旭
// * <li>创建日期：2019-12-11 09:18
// * <li>修改人:
// * <li>修改日期：
// * <li>修改内容：
// */
//public class MenuXY extends AbstractMenuManager {
//    /*###############################################整备检修系统################################################*/
//
//    /**
//     * <li>说明:获取手持端需要展示的菜单列表 - 含group
//     * 整备检修《一体化管理终端》
//     * <li>创建时间:2019/7/11 11:56
//     * <li>创建人: 邹旭
//     * <li>修改人：
//     * <li>修改日期：
//     * <li>修改内容：
//     *
//     * @return
//     */
//    @Override
//    public List<MenuEntity> getFixedMenus() {
//
//        List<MenuEntity> menus = new ArrayList<>();//顺序存储菜单树
//
////        menus.add(new MenuEntity("工作包", true));
//////        menus.add(new MenuEntity("领活"));//作业包领活
////        menus.add(new MenuEntity("范围作业"));
//////        menus.add(new MenuEntity("作业包管理"));//作业包查看
////        menus.add(new MenuEntity("检修班组派工"));
////        menus.add(new MenuEntity(MenuConstant.MENU_FWZY_HJ));
////        menus.add(new MenuEntity("范围作业-专检"));
//
//        //整备的工长有此功能
//        if (SysInfo.ZB_ZB.equals(SysInfo.personInfo.worktype) && ("202".equals(SysInfo.personInfo.postcode) || "工长".equals(SysInfo.personInfo.postdesc))) {
//            menus.add(new MenuEntity("作业包预派工"));//作业包预派工
//        }
//
//        //JT28与JT6二者互斥
//        MenuEntity groupJT28;
//        MenuEntity groupJT6;
//
//
//        //屏蔽故障报修
////        groupJT6 = new MenuEntity(MenuConstant.BAOXIU_GROUP_JT6, true);
////        menus.add(groupJT6);
//        //故障报修
//        menus.add(new MenuEntity(MenuConstant.MENU_GZ_BX_JT6));
//        //物资借用
//        menus.add(new MenuEntity(MENU_WZJY));
//        //物资归还
//        menus.add(new MenuEntity(MenuConstant.MENU_WZGH));
//        //故障复核
//        menus.add(new MenuEntity(MenuConstant.MENU_GZFH));
//        //故障告警
////        menus.add(new MenuEntity(MenuConstant.MENU_GZGJ));
////        menus.add(new MenuEntity(MenuConstant.MENU_GZ_BX_JT6, groupJT6));
//        //故障修活
////        menus.add(new MenuEntity(MenuConstant.MENU_GZ_XH_JT6, groupJT6));
//        //故障管理
////        menus.add(new MenuEntity(MenuConstant.MENU_GZ_GL_JT6, groupJT6));
//        //故障互检
////        menus.add(new MenuEntity(MenuConstant.MENU_GZ_HJ_JT6, groupJT6));
//        //故障专检
////        menus.add(new MenuEntity(MenuConstant.MENU_GZ_ZJ_JT6, groupJT6));
//
////        menus.add(new MenuEntity("故障假设管理",groupJT6));
//
//        //添加请销点功能
////        MenuEntity groupqxd;
////        groupqxd = new MenuEntity("groupqxd", true);
////添加下载 基础数据
////        menus.add(new MenuEntity(MenuConstant.BASE_INFO));
//        //添加下载 任务
//        menus.add(new MenuEntity(MenuConstant.DOWNLOADWORKPACKAGE));
//        //添加上传 任务
////        menus.add(new MenuEntity(MenuConstant.UPLOAD_TASK));
//
///**
// *  屏蔽请销点 2021年4月25日
// */
////        menus.add(new MenuEntity("请销点", true));
////        menus.add(new MenuEntity("作业请点"));
////        menus.add(new MenuEntity("作业销点"));
//        return menus;
//    }
//
//    @Override
//    public void onMenuClick(@NonNull MenuEntity curMenu, Context mContext, FragmentManager fragmentManager) {
//        Intent intent = null;
//        // todo  XX通知单  jddyid   lcdybm
////                if (!TextUtils.isEmpty(curMenu.jddyid) && !TextUtils.isEmpty(curMenu.lcdybm) && curMenu.gnmc.contains("通知单")) {
//        if (!TextUtils.isEmpty(curMenu.jddyid) && !TextUtils.isEmpty(curMenu.lcdybm)) {
////            intent = new Intent(mContext, TodolistActivity.class);
////                    intent = new Intent(mContext, SingleTableTempleteActivity.class);
//        } else if (curMenu.isjxzy == null) {//非服务器端获取菜单 - 固有菜单
//            switch (curMenu.gnmc) {//根据菜单名匹配
//                /**一般仅包含：wzclsl、gnmc
//                 * 可以本地写死
//                 */
////                case "跟踪工单"://todo 暂时隐藏
////                    intent = new Intent(mContext, TrackWorkOrderListActivity.class);
////                    break;
////                case "故障报修":
////                case "JT28报修":
////                case "JT6报修"://整备业务
////                    //单独的报修，默认报修来源bxly为"过程提票""
////                    intent = new Intent(mContext, SingleFaultRepairsActivity.class);
////                    break;
////                case "施修方案改判":
////                case "施修方案确定"://报修技术支持
////                    intent = new Intent(mContext, FaultOrderListActivity.class);
////                    if ("施修方案改判".equals(curMenu.gnmc)) {
////                        intent.putExtra(FaultOrderListActivity.IS_SXFAGP, true);
////                    }
////                    break;
////                case "班组派工"://故障班组派工
////                case "故障班组派工"://故障班组派
//////                    intent = new Intent(mContext, DispatchWorkerActivity.class);
////                    intent = new Intent(mContext, DispatchWorkerActivity.class);
////                    break;
////                case "故障报修单-故障认领"://故障班组派工
//////                case "车辆检修-作业认领"://故障班组派工
//////                    intent = new Intent(mContext, DispatchWorkerActivity.class);
//////                    intent = new Intent(mContext, JXbzpgTrainListActivity.class);
////                    intent = new Intent(mContext, GetWorkListActivity.class);
////                    break;
////                case "车辆检修-作业认领"://故障班组派工
////                    intent = new Intent(mContext, JXbzpgTrainListActivity.class);
//////                    intent = new Intent(mContext, ClaimWorkActivity.class);
////                    break;
////                case "故障调度派工":
////                    intent = new Intent(mContext, DiaoDuPaiGongActivity.class);
////                    break;
//////                        case "施修方案改判":
//////                            intent = new Intent(mContext, SxfagpListActivity.class);
//////                            break;
////                case "故障班组重派工":
////                    intent = new Intent(mContext, com.yunda.sample.module.gzbzcpg.mvp.ui.activity.DispatchWorkerActivity.class);
////                    break;
//////                        case "故障假设":
////                case "故障假设管理":
////                    intent = new Intent(mContext, GzjsActivity.class);
////                    break;
////                case "故障完工":
////                case "故障销活":
////                    intent = new Intent(mContext, FaultDealListActivity.class);
////                    break;
////                case "复检点名"://调度派工
////                    intent = new Intent(mContext, FjdmActivity.class);
////                    break;
////                case "复检分工"://班组派工
////                    intent = new Intent(mContext, com.yunda.sample.module.fjfg.mvp.ui.activity.DispatchWorkerActivity.class);
////                    break;
////                case "接车登记"://单独的编辑页面
////                    //    intent = new Intent(mContext, ReceiveTrainPlanListActivity.class);//常涛对接接口的页面
////                    //    intent = new Intent(mContext, TrainListActivity.class);//对应于检修对象的接车登记
////                    intent = new Intent(mContext, JcdjActivity.class);
////                    break;
////                case "扣车登记"://曾今：扣车登记、接车登记时流程节点
////                case MenuConstant.MENU_JCYJ://曾今：扣车登记、接车登记时流程节点
////                    //   intent = new Intent(mContext, KcdjTrainListActivity.class);
////                    intent = new Intent(mContext, TrainListActivity.class);
////                    break;
////                case "零公里检查":
////                    intent = new Intent(mContext, LgljcActivity.class);
////                    break;
////                case "固定检修-调度派工":
////                case "专项整治-调度派工":
////                case "检修调度派工":
////                    intent = new Intent(mContext, JxddpgTrainListActivity.class);
////                    break;
////                case "固定检修-班组派工":
////                case "专项整治-班组派工":
////                case "检修班组派工": //修改班组派工逻辑 必须wzclsl大于0才能进入
////                    if(curMenu.wzclsl>0){
////                        intent = new Intent(mContext, JXbzpgTrainListActivity.class);
////                    }
////
////                    break;
////                case "保养评定":
////                    intent = new Intent(mContext, BypdTrainListActivity.class);
////                    break;
////                case "检修评定":
////                    intent = new Intent(mContext, JxpdTrainListActivity.class);
////                    break;
//////                        case "作业包领活":
////                case "领活":
////                    intent = new Intent(mContext, LingHuoActivity.class);
////                    break;
////                case "作业包管理"://整备检修系统
////                case "范围管理"://160系统
////                    intent = new Intent(mContext, LingHuoLookOverActivity.class);
////                    break;
////                case "班组点名":
////                    intent = new Intent(mContext, BzdmActivity.class);
////                    break;
////                case "JT28管理":
////                case "JT28修活":
////                case "JT6管理":
////                case "JT6修活":
////                case MenuConstant.MENU_GZ_XH_JT6:
////                case MenuConstant.MENU_GZ_GL_JT6:
////                    intent = new Intent(mContext, JT28Activity.class);
////                    break;
////                case "机车进度查看":
//////                    new TrainProgressLook().show(fragmentManager, "");
////                    //功能重做
////                    intent = new Intent(mContext, TrainProgressLookActivity.class);
////                    break;
////                case "对规检查":
//////                    intent = new Intent(mContext, DgjcActivity.class);
////                    intent = new Intent(mContext, DgjcListActivity.class);
////                    break;
////                case "作业包预派工"://整备检修系统
////                case "范围预派工"://160系统
////                    intent = new Intent(mContext, ZybypgActivity.class);
////                    break;
////                //分析报告
////                case "临修分析":
////                case "设备故障分析":
////                    intent = new Intent(mContext, FxbgActivity.class);
////                    break;
////                case "股道及方位修改":
////                    intent = new Intent(mContext, ToCorrectGdAndFwListActivity.class);
////                    break;
////                //请销点
////                case "作业请点":
////                    intent = new Intent(mContext, QingDianJHListActivity.class);
////                    break;
////                case "作业销点":
////                    intent = new Intent(mContext, XiaoDianTodoListActivity.class);
////                    break;
////                case MenuConstant.MENU_ZYB_DOWNLOAD:
////                    new TaskDownloadQueueDialog().show(fragmentManager, "");
////                    return;
//////                case "机车入段":
//////                    intent = new Intent(mContext, JcrdActivity.class);
//////                    break;
//////                case "数据上传":
//////                    mContext.startService(new Intent(mContext, DataSyncService.class));
//////                    return;
////                //物资借用
////                case MENU_WZJY:
////                    intent=new Intent(mContext, LeadingListActivity.class);
////                    break;
////                //物资归还
////                case MENU_WZGH:
////                    intent=new Intent(mContext, EquipmentReturnActivity.class);
////                    break;
////                //故障复核
////                case MENU_GZFH:
////                    intent=new Intent(mContext, FaultReviewActivity.class);
////                    intent.putExtra("MENU_GZFH",true);
////                    break;
////                //故障告警
////                case MENU_GZGJ:
////                    intent=new Intent(mContext, FaultReviewActivity.class);
////                    break;
//            }
//            // 根据菜单类型检查方式匹配菜单(JT28互检/专检  JT6互检/专检)
////            if ("JCFS".equals(curMenu.type)) {
////                intent = new Intent(mContext, WorkOrderHandleActivity.class);
////            }
//        } else {//服务器配置
//            String gnmc = curMenu.gnmc;
//            Logger.e("点击了"+gnmc);
//            switch (curMenu.isjxzy) {//区分操作
//                case "0"://流程工单 - 直接进入检查项页面
//                case "1"://工艺工单("范围作业"...)
//                case "2"://"类"工艺工单,复检
////                    intent = new Intent(mContext, TrainListActivity.class);
//                    if(gnmc.equals(MenuConstant.MENU_FWZY_HJ)){
//                        intent.putExtra("ishj","1");
//                    }
//                    Logger.e(new Gson().toJson(curMenu)+"??");
//                    break;
//                default://其他
//                    break;
//            }
//        }
//        if (intent != null) {
//            ArmsUtils.startActivity(intent);
//        } else {
////                    showMessage("无效菜单名");
//            Logger.e("无效菜单名");
//            return;
//        }
//        String info = curMenu.gnmc;
//        if (info.equals("作业内容")) {
//            SysInfo.gnmc = "作业内容";
//        } else {
//            SysInfo.gnmc = curMenu.gnmc;
//        }
//
//    }
//}
